<?php defined( '_JEXEC') or die; ?>
    <div class="subhead">
        <p>
			<a name="content"></a>
            <h2>
                Search results:
                <?php echo $this->totalFile; ?> files found
            </h2>
        </p>
        <table border="0" cellspacing="0">
            <?php 
				$cnt = 0;
				foreach($this->results as $file) :
					$cnt++;
				?>
                <tr class="<?php if($cnt % 2 == 0) echo "row0"; else echo "row1"; ?>">
                    <td>
                        <p>
							<a href="<?php echo JRoute::_('index.php?option=com_volunteer&view=filedetail&fileid=' . $file->id); ?>"><?php echo $file->name; ?></a>
                                <br/>
                                <?php echo substr($file->description, 0, 120) . '...'; ?>
                        </p>
                        <p>
                            Last update:
                            <?php echo $file->last_modified_on; ?> by
                                <?php echo $file->last_modified_by; ?>
                        </p>
                    </td>
                    <td width="18%">
                        <a href="<?php echo JRoute::_('index.php?option=com_volunteer&view=filedetail&fileid=' . $file->id); ?>">View</a>
                        &nbsp;
                        <a href="<?php echo JRoute::_('index.php?option=com_volunteer&view=editfile&fileid=' . $file->id); ?>">Edit</a>
                        &nbsp;
                        <a href="<?php echo JRoute::_('index.php?option=com_volunteer&task=deletefile&fileid=' . $file->id); ?>"
                        onclick="javascript: return confirm('Delete this file?');">Delete</a>
                    </td>
                </tr>
                <?php endforeach; ?>
        </table>
        <div class="pagination">
            <?php echo $this->pagination->getPagesLinks(); ?>
        </div>
    </div>